package com.shop.controller;

import com.shop.bean.Book;
import com.shop.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author liuyuan
 * @Date 2022/7/14 11:31 PM
 * @Version 1.0
 */
@RestController
public class BookController {
    @Autowired
    BookMapper mapper;
    @RequestMapping("list")
    public List<Book> list(){
        List<Book> list = mapper.list();
        return list;
    }
}
